package org.shiwen.week2.thursday;

import java.util.Scanner;

public class q3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入Java课程成绩：");
        double javaScore = sc.nextDouble();
        System.out.println("请输入C语言成绩：");
        double cScore = sc.nextDouble();
        System.out.println("请输入数据库课程成绩：");
        double databaseScore = sc.nextDouble();
        System.out.println("Java和C语言的分数差为："+Math.abs(javaScore-cScore));
        System.out.println("三门课的平均分为："+(javaScore+cScore+databaseScore)/3);
    }
}
